"use strict";

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.bulkInsert(
      "Courses",
      [
        {
          categoryId: 1,
          userId: 1,
          name: "React",
          content: "React项目学习",
          recommended: true,
          introductiory: true,
          likesCount: 0,
          chaptersCount: 0,
          createdAt: new Date(),
          updatedAt: new Date(),
        },
        {
          categoryId: 2,
          userId: 2,
          name: "Vue",
          content: "Vue项目学习",
          recommended: true,
          introductiory: false,
          likesCount: 0,  
          chaptersCount: 0,
          createdAt: new Date(),
          updatedAt: new Date(),
        },
      ],
      {}
    );
  },

  async down(queryInterface, Sequelize) {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
  },
};
